// 超出几行变省略号
@for $i from 1 through 5 {
  .v-line-#{$i} {
    @if $i == 1 {
      overflow: hidden;
      white-space: nowrap;
      text-overflow: ellipsis;
    } @else {
      display: -webkit-box !important;
      overflow: hidden;
      text-overflow: ellipsis;
      word-break: break-all;
      -webkit-line-clamp: $i;
      -webkit-box-orient: vertical !important;
    }
  }
}

/* 页面切换动画 */
.pageChange-enter-active,
.pageChange-leave-active,
.pageChange-enter-active,
.pageChange-leave-active {
  will-change: transform;
  transition: all 0.4s ease;
}
.pageChange-enter-from {
  opacity: 0;
  transform: translateX(-25px);
}
.pageChange-leave-to {
  opacity: 0;
  transform: translateX(25px);
}

/* Breadcrumb 面包屑过渡动画 */
.breadcrumb-enter-active,
.breadcrumb-leave-active {
  transition: all 0.5s ease;
}
.breadcrumb-leave-from {
  opacity: 0;
}
.breadcrumb-enter-from,
.breadcrumb-leave-active {
  opacity: 0;
  transform: translateX(25px);
}
.breadcrumb-leave-active {
  position: absolute;
  z-index: -1;
}

// 鼠标经过上移阴影动画
@mixin hoverShadow() {
  transition: all 0.5s;
  &:hover {
    transform: translate3d(0, -3px, 0);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
  }
}

// 由下往上淡入动画
@keyframes bottom2TopOpacity {
  0% {
    transform: translateY(60px);
    opacity: 0;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes upAndDown {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-28px);
  }
  100% {
    transform: translateY(0px);
  }
}

// 骨架屏闪动动画
@keyframes shan {
  0% {
    left: -19%;
  }
  100% {
    left: 108%;
  }
}
.shan {
  font-size: 22rpx;
  min-width: 90rpx;
  padding: 8rpx;
  box-sizing: border-box;
  text-align: center;
  border-radius: 6rpx;
  color: #ffffff !important;
  background-color: rgb(124, 58, 237) !important;
  position: relative;
}
.shan::after {
  content: "";
  position: absolute;
  top: 0;
  width: 40%;
  height: 100%;
  animation: shan 1.5s ease 0s infinite;
  background: linear-gradient(
    to left,
    rgba(255, 255, 255, 0) 0,
    rgba(255, 255, 255, 0.5) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: skewX(-40deg);
}

// 滚动条
::-webkit-scrollbar {
  // x方向
  width: 6px;
  // y方向
  height: 6px;
  background-color: #ffffff;
}

/*定义滚动条轨道 内阴影+圆角*/
::-webkit-scrollbar-track {
  box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.2);
  -webkit-box-shadow: inset 0 0 6px rgba(82, 82, 82, 0.2);
  background-color: #ffffff;
}

/*定义滑块 内阴影+圆角*/
::-webkit-scrollbar-thumb {
  border-radius: 10px;
  box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.1);
  -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.1);
  background-color: #d4d4d4;
}
